
let cfg = {
    // w: document.documentElement.clientWidth || document.body.clientWidth,
    // h: document.documentElement.clientHeight || document.body.clientHeight,
    name: '员工成长系统',
    sys: 'ygczmobile',
}
// cfg.baseurl = 'http://192.168.100.7:8080/staff_mis/'
cfg.baseurl = 'https://common.sanyedu.com/'
// cfg.baseurl = 'https://base.sanyedu.com/'
cfg.commonurl = 'https://common.sanyedu.com/'
cfg.uploadurl = 'https://oss.sanyedu.com/oss/upload'
cfg.viewurl = 'https://view.sanyedu.com/onlinePreview?url='
cfg.wsUri = 'wss://base.sanyedu.com/staff_mis/staff_grow/staffwebappsocket/'
// cfg.testwsUri = 'ws://192.168.100.4:8080/staff_mis/staff_grow/staffwebappsocket/'
cfg.token = function (a) {
    if (typeof (a) == "undefined") {
        let a = '';
        try { a = uni.getStorageSync(cfg.sys + '_token') || '' } catch (e) { }
        return a;
    } else {
        try { uni.setStorageSync(cfg.sys + '_token', a); } catch (e) { }
    }
}
cfg.flag = function (a) {
    if (typeof (a) == "undefined") {
        let a = false;
        try { a = uni.getStorageSync(cfg.sys + '_flag') || false } catch (e) { }
        return a;
    } else {
        try { uni.setStorageSync(cfg.sys + '_flag', a); } catch (e) { }
    }
}
cfg.userlist = function (a) {
    if (typeof (a) == "undefined") {
        let a = false;
        try { a = uni.getStorageSync(cfg.sys + '_userlist') || false } catch (e) { }
        return a;
    } else {
        try { uni.setStorageSync(cfg.sys + '_userlist', a); } catch (e) { }
    }
}
cfg.platform = function (a) {
    console.log(a);
    if (typeof (a) == "undefined") {
        let a = '';
        try { a = uni.getStorageSync(cfg.sys + '_platform') || '' } catch (e) { }
        return a;
    } else {
        try { uni.setStorageSync(cfg.sys + '_platform', a); } catch (e) { }
    }
}
cfg.access_token = function (a) {
    if (typeof (a) == "undefined") {
        let a = '';
        try { a = uni.getStorageSync(cfg.sys + '_access_token') || '' } catch (e) { }
        return a;
    } else {
        try { uni.setStorageSync(cfg.sys + '_access_token', a); } catch (e) { }
    }
}
cfg.switch = function (a) {
    if (typeof (a) == "undefined") {
        let a = '';
        try { a = uni.getStorageSync(cfg.sys + '_switch') || '' } catch (e) { }
        return a;
    } else {
        try { uni.setStorageSync(cfg.sys + '_switch', a); } catch (e) { }
    }
}

cfg.scrollTophome = function (a) {
    if (typeof (a) == "undefined") {
        let a = 0;
        try { a = uni.getStorageSync(cfg.sys + '_scrollTophome') || 0 } catch (e) { }
        return a;
    } else {
        try { uni.setStorageSync(cfg.sys + '_scrollTophome', a); } catch (e) { }
    }
}


cfg.user = function (a) {
    if (typeof (a) == "undefined") {
        let a = '';
        try { a = uni.getStorageSync(cfg.sys + '_user') || '' } catch (e) { }
        return a;
    } else {
        try { uni.setStorageSync(cfg.sys + '_user', a); } catch (e) { }
    }
}

cfg.rempass = function (a) {
    if (typeof (a) == "undefined") {
        let a = {};
        try { a = uni.getStorageSync('rempass') || {} } catch (e) { }
        return a;
    } else {
        try { uni.setStorageSync('rempass', a); } catch (e) { }
    }
}

export default cfg







